package com.tongtian.mychess;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import java.util.List;

/**
 * Created by tongtian on 2017/11/1.
 */
public class MapAdapter extends RecyclerView.Adapter<RecyclerView.ViewHolder> {

    private Context mContext;
    private List<String> list;

    public MapAdapter(Context context, List<String> list){
        this.mContext = context;
        this.list =list;
    }

    @Override
    public RecyclerView.ViewHolder onCreateViewHolder(ViewGroup parent, int viewType) {
        RecyclerView.ViewHolder holder = new MyHolder(LayoutInflater.from(mContext).inflate(R.layout.recycler_item_map,parent,false));
        return holder;
    }

    @Override
    public void onBindViewHolder(RecyclerView.ViewHolder holder, final int position) {
            MyHolder myHolder = (MyHolder) holder;

    }

    @Override
    public int getItemCount() {
        return list.size();
    }

    class MyHolder extends RecyclerView.ViewHolder{
        View view;
        public MyHolder(View itemView) {
            super(itemView);
            view = itemView.findViewById(R.id.view);
        }
    }



}
